package com.zy.experience_system.repository;

import com.zy.experience_system.entity.TestAndSet;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface TestAndSetRepository extends JpaRepository<TestAndSet,Integer> {
    TestAndSet findByTestIdAndSetId(Integer testId,Integer setId);
    List<TestAndSet> findAllByTestIdAndSetId(Integer testId,Integer setId);
    @Transactional
    void deleteByTestIdAndSetId(Integer testId,Integer setId);
    List<TestAndSet> findAllBySetId(Integer testId);
}
